At present, vehicle control includes engine control based on air-fuel ratio, fuel injection amount, emission, etc., and vehicle body control of such elements as power windows, an airbag, and an ABS. Such control is carried out by electronic control units, hereinafter referred to as “ECU.” One or more ECUs control a vehicle in various manners based on the conditions of the vehicle detected by various sensors mounted on the vehicle.
An ECU comprises a central processing unit (CPU), a ROM (read-only memory) for storing programs and data to be executed, a RAM (random access memory) for providing an operational work space at the runtime to store operation results and an input/output interface for receiving signals from various sensors and sending control signals to each engine part. A ROM may comprise a rewritable nonvolatile memory such as a flash memory and an EEPROM.
A system for rewriting data stored in such a nonvolatile memory is known. Such a system typically comprises a rewriting device, an ECU, and a serial communication path for interconnecting the rewriting device and the ECU. In operation, the ECU erases data stored in the nonvolatile memory, and receives data sent from the rewriting device through the serial communication path. The received data is written in a predetermined region of the nonvolatile memory. After the time required to write the data into the nonvolatile memory has elapsed, the rewriting device sends the next data to be written into the memory to the ECU.
For example, Japanese Patent Application Unexamined Publication (Kokai) No. S63-223901 discloses a method for updating programs stored in an EEPROM of an ECU of a vehicle through a SCI (serial communication interface) terminal in response to a request from an external rewriting device without dismounting the ECU from the vehicle.
A timing chart for rewriting operation in such a conventional rewriting system is shown in FIG. 12. An external rewriting device sends a data block 1 to an ECU. The time required for the data block 1 to arrive at the ECU from the rewriting device is Ttx. The ECU receives the data block 1 and starts writing the data block 1 into the memory. The time required to write the data block 1 into the memory is Twr. The rewriting device sends a next data block 2 to the ECU after writing the data block 1 into the memory is completed. The ECU receives the data block 2 and starts writing the data block 2 into the memory. Thus, sending and writing of data blocks are sequentially performed.
As shown in FIG. 12, assuming that the size of each data block is equal, rewriting operation takes at least time “(Ttx+Twr)×Ntx.” As described above, Ttx indicates the time required for one data block to be sent from the rewriting device to the ECU. Twr indicates the time required for one data block to be written into the memory. Ntx indicates the number of times of sending data.
The writing time Twr is dependent on the specification of the nonvolatile memory. The number of times of sending is dependent on the amount of the data to be rewritten. Therefore, in order to shorten the time required to rewrite data in the nonvolatile memory, the sending time Ttx needs to be decreased.
The communication speed needs to be increased so as to decrease the sending time Ttx. However, the rewriting device and the ECU are usually interconnected via a serial communication. As long as the serial communication is used, increase of the communication speed is not easily achieved because the communication speed is specified by specifications of the cable.
Thus, there exists a need for a device and method that reduces the time to rewrite data stored in a nonvolatile memory without increasing the communication speed.